@extends('welcome')
@section('zhong_content')
<style type="text/css">
	.ww{padding-left: 300px;}
	.mimi{padding-left: 300px;}
	.ss{padding-left: 600px;font-size:20px;color:#1F409C;}
</style>
<link href="/Home/ider/support.css" rel="stylesheet" type="text/css" />
@if(session('success'))
	<span style="color:red">{{session('success')}}</span>
@endif
@if(session('error'))
	<span style="color:red">{{session('error')}}</span>
@endif
<div class="ss"><span class="d"><a href="{{url('/ider')}}">大家在说</a></span><span class="mi" style="padding-left:20px"><a href="">我要说一下</a></span></div>
<div style="height:20px;"></div>
<hr>
<script type="text/javascript">
	$('.d').click(function(){
		$('.discuss').show();
		$('.mimi').hide();
		return false;
	})
	$('.mi').click(function(){
		$('.discuss').hide();
		$('.mimi').show();
		return false;
	})
</script>
<div class="ww">
  <!--贴子内容-->
  <button><a href="{{url('/ider')}}"><<<返回</a></button>
  <div class="discuss" id="discuss_content">
    <ul>
    	
      <li>
        <h3><span id="post_style_0" class="ico_ding"></span>{{$ider->title}}</h3>
        <div class="comment">
          <p id="author_info" class="author_info">楼主: {{$ider->uname}} 于 {{$ider->time}} 发表</p>
          <p>{!!$ider->content!!}</p>
          <span>回复({{$num}})</span>
          @foreach($huifu as $k=>$v)
          <div style="height:30px"></div>
          <hr>
          <div class="answer">
            <p id="answer_info">提问人： <span id="pdt_admin_0" class="tx_thin2">{{$v->id}}楼:&nbsp;{{$v->uname}}&nbsp;于{{$v->time}}发表</span></p>
            <p>{!!$v->content!!}</p>
          </div>
          @endforeach
        </div>
		<input id="style_0" type="hidden" value="8473"/>
		<input id="admin_0" type="hidden" value="1"/>
		<input id="time_0" type="hidden" value="1461221059"/>
      </li>
	     </ul>
  </div>

</div>
<div class="mimi" style="">
    @if(session('name'))
    <script type="text/javascript" charset="utf-8" src="/public/baidu/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="/public/baidu/ueditor.all.min.js"> </script>
    <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
    <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
    <script type="text/javascript" charset="utf-8" src="/public/baidu/lang/zh-cn/zh-cn.js"></script>
	
	<form action="{{url('/ider/addhuifu')}}" method="post">
    回帖:<script id="editor" name="content" type="text/plain" placeholder="请输入4~30个字符" style="width:524px;height:150px;"></script>
	<div style="height:20px"></div>
	<input type="hidden" name="iid" value="{{$ider->id}}">
    <button style="width:80px;">回复</button>
    {{csrf_field()}}
    </form>
	
<script type="text/javascript">
	//实例化编辑器
    //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
    var ue = UE.getEditor('editor',{
    	toolbars: [
		    ['fullscreen', 'source', 'undo', 'redo'],
		    ['bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc']
		]
    });
</script>
@endif
</div>
@endsection